import request from '@/utils/request'

// 分页查询应用管理列表
export function applicationQueryList(query) {
  // return request.get(`http://172.18.41.10:9403//manage/app/queryList`, {query})
    return request({
      url: '/ykm1-manage/manage/app/queryList',
      // url:`http://172.18.41.10:9403/manage/app/queryList`,
      // url:`http://172.18.41.230:8080/manage/app/queryList`,
      // url:`http://172.18.40.8:8099/manage/app/queryList`,
      method: 'get',
      params: query
    })
  }

// 添加应用
export function applicationAdd(query) {
    return request({
      url: '/ykm1-manage/manage/app/add',
      // url:'http://172.18.41.10:9403/manage/app/add',
      method: 'post',
      data: query
    })
  }

// 查询应用信息
export function applicationInfo(query) {
    return request({
      url: '/ykm1-manage/manage/app/queryInfo',
      method: 'post',
      data: query
    })
  }

// 修改应用
export function updataApplication(query) {
    return request({
      url: '/ykm1-manage/manage/app/updateInfo',
      // url:'http://172.18.41.10:9403/manage/app/updateInfo',
      method: 'post',
      data: query
    })
    // return request.post(`url:'http://172.18.41.10:9403/manage/app/updateInfo',`, query)
  }

// 删除应用
export function deleteApplication(query) {
    return request({
      url: '/ykm1-manage/manage/app/delete',
      method: 'delete',
      params: query
    })
  }

// 查询所有应用列表
export function allAppList(query) {
    return request({
      url: '/ykm1-manage/manage/app/querySelectAppList',
      // url: 'http://172.18.41.10:9403/manage/app/querySelectAppList',
      method: 'get',
      params: query
    })
  }

// 查询所有卡类型列表
export function allCard(query) {
    return request({
      url: '/ykm1-manage/manage/card/queryCardAll',
      // url: 'http://172.18.41.10:9403/manage/card/queryCardAll',
      method: 'get',
      params: query
    })
  }

// 上传图片
export function uploadImg(query) {
    return request({
      url: '/ykm1-manage/file/upload',
      // url: 'http://172.18.41.10:9403/file/upload',
      method: 'post',
      data: query
    })
  }

// 卡授权
export function addRoleCard(query) {
    return request({
      url: '/ykm1-manage/manage/card/openRole',
      // url:`http://172.18.41.10:9403/manage/card/openRole`,
      // url:'http://172.18.40.8:8099/manage/card/openRole',
      method: 'post',
      data: query
    })
  }

// 修改appkey(应用的key)
export function updateAppKey(query) {
    return request({
      url: '/ykm1-manage/manage/app/updateAppKey',
      method: 'post',
      data: query
    })
  }

// 修改apptoken(应用的key)
export function updateAppToken(query) {
    return request({
      url: '/ykm1-manage/manage/app/updateAppToken',
      method: 'post',
      data: query
    })
  }

// 新增码
export function addCard(query) {
    return request({
      url: '/ykm1-manage/manage/card/add',
      method: 'post',
      data: query
    })
  }